package com.jk.dmconsumer.controller;

import com.jk.dmcommon.entity.CouponEntity;
import com.jk.dmcommon.entity.GoodsEntity;
import com.jk.dmcommon.entity.ShopEntity;
import com.jk.dmconsumer.service.GoodsOrderServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 文件名称:GoodsOrderController
 *
 * @Description //TODO $
 * @Date $ $
 * 作者 郭英杰
 * Copyright (c) 2021, yuxy123@gmail.com All Rights Reserved.</pre>
 */
@RestController
public class GoodsOrderController {

    @Autowired
    private GoodsOrderServcie goodsOrderServcie;

    /*配送方式*/
    @RequestMapping("goodsOrder/distribution")
    public ShopEntity distribution(Integer leaveId){
        return goodsOrderServcie.distribution(leaveId);
    }
    /*提交订单*/
    @RequestMapping("/goodsOrder/payment")
    public ShopEntity payment(Integer leaveId,Double totalPrices,String site,Integer goodsCount,Integer couponId){
        return goodsOrderServcie.payment(leaveId,totalPrices,site,goodsCount,couponId);
    }
    //查询优惠券
    @RequestMapping("/goodsOrder/queryCoupon")
    public CouponEntity queryCoupon(Integer couponId){
        return goodsOrderServcie.queryCoupon(couponId);
    }



}
